1
/****************************** Module Header ******************************\
2 Module Name: Program.cs
3 Project: CSTFSWorkItemLinkInfoDetails
4 Copyright (c) Microsoft Corporation.
6 The main entry of the application. To run this application, use following command
9 CSTFSWorkItemLinkInfoDetails.exe <CollectionUrl> <WorkItemID>
12 This source is subject to the Microsoft Public License.
13 See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
14 All other rights reserved.
16 THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
17 EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
19 \***************************************************************************/
23 using Microsoft
.TeamFoundation
.Client
;
24 using Microsoft
.TeamFoundation
.WorkItemTracking
.Client
;
26 namespace CSTFSWorkItemLinkInfoDetails
30 static void Main(string[] args
)
34 // There are 2 arguments.
38 // Get CollectionUrl and WorkItemID from the arguments.
39 Uri collectionUri
= new Uri(args
[0]);
40 int workitemID
= int.Parse(args
[1]);
42 using (WorkItemLinkQuery query
= new WorkItemLinkQuery(collectionUri
))
45 // Get the WorkItemLinkInfoDetails list of a work item.
46 var detailsList
= query
.GetWorkItemLinkInfos(workitemID
);
48 foreach (WorkItemLinkInfoDetails details
in detailsList
)
50 Console
.WriteLine(details
.ToString());
56 Console
.WriteLine("Use following command arguments to use this application:");
57 Console
.WriteLine("CSTFSWorkItemLinkInfoDetails.exe <CollectionUrl> <WorkItemID>");
62 Console
.WriteLine(ex
.Message
);